package com.acme.task2;

public class Foo {
	public static int a=0;
	int p;
	Foo(int i){
		p=i;
	}
	public int getp(){
		return this.p;
	}
	@Override
	protected void finalize() throws Throwable {
		//TODO: print to console that finalize() was called
		a=a+1;
		System.out.println("Finalize was called "+a);
		super.finalize();
	}
}
